Skip to content

build(windows): add arm64 initial support#3905

Open
rbqvq wants to merge 12 commits intoLizardByte:masterfrom
rbqvq:master
Open

build(windows): add arm64 initial support#3905
rbqvq wants to merge 12 commits intoLizardByte:masterfrom
rbqvq:master

Conversation

@rbqvq
Copy link
Contributor

@rbqvq rbqvq commented May 25, 2025

Description

This PR adds an arm64 build for Windows.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

@rbqvq

This comment was marked as resolved.

@rbqvq rbqvq force-pushed the master branch 4 times, most recently from 0ccee19 to 4039fec Compare May 25, 2025 10:23
@rbqvq
Copy link
Contributor Author

rbqvq commented Jun 2, 2025

Can we use this hardware encode? 🤔
obsproject/obs-studio#11993

@ReenigneArcher
Copy link
Member

I think MF encoder is already included with the FFmpeg build, so why not?

@rbqvq
Copy link
Contributor Author

rbqvq commented Jun 2, 2025

I think MF encoder is already included with the FFmpeg build, so why not?

Well, I didn't read the source code of sunshine.
This part is up to you. 🤪

@rbqvq

This comment was marked as resolved.

@rbqvq rbqvq force-pushed the master branch 11 times, most recently from 9d0c82c to b0e2234 Compare June 9, 2025 09:53
@rbqvq rbqvq force-pushed the master branch 2 times, most recently from 48376c4 to a3ee774 Compare June 30, 2025 05:21
@ReenigneArcher

This comment was marked as resolved.

@ReenigneArcher
Copy link
Member

I think we can provide only portable version for windows arm64 currently, installer will be delay.

OBS Studio also don't have a installer, only portable.

So I think its okay.

If you agree I will update markdown docs

wix PR will be merged before this one. Packaging seems to work when combining this PR with my wix PR as tested in #4661

@rbqvq

This comment was marked as resolved.

@rbqvq rbqvq force-pushed the master branch 5 times, most recently from 3ecf7aa to 297379a Compare February 5, 2026 11:39
@rbqvq rbqvq force-pushed the master branch 2 times, most recently from 941f7ef to b56e527 Compare February 5, 2026 13:52
rbqvq and others added 10 commits February 6, 2026 09:02
MinHook does not support Windows ARM64.

So sing minhook-detours for Windows ARM64.

Signed-off-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
Steam Audio Driver not available on Windows ARM64

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Use ::std:: fully qualified namespace in template functions to avoid
  ambiguity with clang namespace resolution.

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Co-authored-by: Ricky8955555 <rkmiao@duck.com>
Add TOSTRING for ICON.

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Add vendor ID detection for Qualcomm Adreno GPUs:
- 0x4D4F4351: "QCOM" in ASCII (reversed as little-endian)
- 0x5143: Alternate Qualcomm vendor ID

When a Qualcomm GPU is detected, only Media Foundation encoders
(h264_mf, hevc_mf, av1_mf) are considered compatible, as Qualcomm
doesn't support NVENC, AMF, or QSV encoder APIs.
Add Windows Media Foundation hardware encoder support for platforms
that don't have NVENC, AMF, or QSV (primarily Qualcomm Snapdragon).

Encoders added:
- h264_mf: H.264 via Media Foundation
- hevc_mf: HEVC via Media Foundation
- av1_mf: AV1 via Media Foundation

Configuration:
- Uses D3D11VA hardware device for GPU texture input
- CBR rate control with display_remoting scenario for streaming
- Only supports SDR 4:2:0 8-bit (Qualcomm MF encoder limitation)
- Fixed GOP size of 120 frames since MF doesn't support on-demand IDR

The mediafoundation encoder is probed after quicksync and amdvce,
serving as a fallback for ARM64 Windows devices.
CLANGARM64 cannot load @rollup/rollup-win32-arm64-msvc native version.

Add npm overrides to force rollup to use the WASM version.

Add a CI step to dump npm debug logs (always run) to aid troubleshooting install failures.

Enable nvm_node for Debian 12 and 13 in scripts/linux_build.sh to allow Node installation via nvm on those distros.

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
Delete the `#warning` emitted for non-x64 architectures in src/platform/windows/audio.cpp.

Update cmake/compile_definitions/windows.cmake to suppress specific GCC warnings when building for Windows ARM64.

Add flags to SUNSHINE_COMPILE_OPTIONS for CMAKE_SYSTEM_PROCESSOR=ARM64 to silence warnings.

- `-Wno-dll-attribute-on-redeclaration` for Boost
- `-Wno-unknown-warning-option` for ViGEmClient
- `-Wno-unused-variable` for Boost

Signed-off-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
Replace variable-length arrays with std::vector in src/platform/windows/input.cpp and src/platform/windows/misc.cpp for safety and portability.

Add <vector> includes, allocate wide-character buffer with std::vector<WCHAR> and pass wide.data() to MultiByteToWideChar, and replace WSABUF VLA with std::vector<WSABUF> and use .data() for msg.lpBuffers.

These changes avoid non-standard VLAs and reduce stack-allocation risks.

Signed-off-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
Drop the HMODULE dll = nullptr; declaration from src/nvenc/nvenc_d3d11_on_cuda.h.

This removes an unused module handle field from the nvenc D3D11-on-CUDA wrapper to reduce unnecessary state.

Signed-off-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 6, 2026

rbqvq and others added 2 commits February 6, 2026 09:27
NSIS installer does not support CLANGARM64.

So only pack portable version currently.

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
Add windows arm64 documents.

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants